﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using ITS.DAL.Events;
using ITS.Core.Domain.Events;
using Ninject;
using ITS.DAL.ForTesting;
using ITS.DAL.Concrete.EF.ForTesting;
using ITS.Factory;

namespace ITS.WebServices.TestServices
{
    /// <summary>
    /// Summary description for TestService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class TestService : System.Web.Services.WebService
    {
        //[Inject]
        private readonly IForTestingRepository _forTestingRepository;

        public TestService()
        {
            _forTestingRepository = NinjectRepositoriesFactory.Get<IForTestingRepository>();
        }
        public TestService(IForTestingRepository forTestingRepository)
        {
            _forTestingRepository = forTestingRepository;
        }
        [WebMethod]
        public string Message()
        {
            return _forTestingRepository.TestMessage;
        }
        [WebMethod]
        public string Message2()
        {
            return _forTestingRepository.TestMessage2;
        }
    }
}
